<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="item in arr" :key="item.id">
                <input type="checkbox" v-model="item.check">{{item.name}}
            </li>
        </ul>
        <button @click="del">删除</button>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                arr: [
                    {
                        name: '这是一个任务',
                        id: 0,
                        check: false
                    },
                    {
                        name: '这是二个任务',
                        id: 1,
                        check: false
                    },
                    {
                        name: '这是三个任务',
                        id: 2,
                        check: false
                    },
                    {
                        name: '这是四个任务',
                        id: 3,
                        check: false
                    },
                    {
                        name: '这是五个任务',
                        id: 4,
                        check: false
                    }
                ]
            },


            methods: {
                del() {
                    this.arr = this.arr.filter(item =>{
                        return !item.check
                    })
                }
            }
        })


        function Person() {

        }

        var person = new Person()

        console.log(person)
    </script>
</body>
</html>